import Vue from 'vue';
import VueRouter from "vue-router";
import VueResource from 'vue-resource';
import routes from "./router.index";

// element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';

// font-awesome
import '../font/font-awesome/font-awesome.css';

// css
import '../css/index.css';

// 组件注册
Vue.use(VueRouter);
Vue.use(VueResource);

// 注册ElementUI
Vue.use(ElementUI);

// 注册路由
const router = new VueRouter({
    routes:  routes
});

// Index
import Index from '../components/home/index.vue';

// 注册实例，挂载节点
const vm = new Vue({
    router,
    render: h => h(Index)
}).$mount('#app');

window.vm_index = vm;